<template>
	<view>
		<uni-section title="巡检点" type="line">
			<uni-card :is-shadow="false">
				<view class="">
					<div v-for="item in routeForm">
						<p>巡检位置：{{ item.address }}</p>
						<p>巡检名称：{{ item.name }}</p>
					</div>
				</view>
			</uni-card>
		</uni-section>
		<uni-section title="部门人员" type="line">
			<uni-card :is-shadow="false">
				<view class="">
					<div v-for="item in teamForm">
						<p>名称：{{ item.userName }}</p>
						<p>昵称：{{ item.nickName }}</p>
						<p>手机号：{{ item.phonenumber }}</p>
						<p>邮箱：{{ item.email }}</p>
					</div>
				</view>
			</uni-card>
		</uni-section>
	</view>
</template>

<script>
import { getRouteList, getTeamMember } from '@/api/system/user.js';
export default {
	data() {
		return {
			routeForm: [],
			teamForm: []
		};
	},
	onLoad(option) {
		if (option.data) {
			const { routeId, teamId } = JSON.parse(option.data);
			this.GetRouteList(routeId);
			this.GetTeamMember(teamId);
			// console.log('option.data', option.data);
		}
	},
	methods: {
		GetRouteList(b) {
			getRouteList(1, 10000, b).then((res) => {
				this.routeForm = res.rows;
				console.log('res', res);
			});
		},
		GetTeamMember(b) {
			getTeamMember(1, 10000, b).then((res) => {
				this.teamForm = res.rows;
			});
		}
	}
};
</script>

<style lang="scss"></style>
